<!--
 * @Author: your name
 * @Date: 2020-12-31 14:59:41
 * @LastEditTime: 2020-12-31 15:11:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \basicvue\vuehtml\v-other.html
-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../assets/css/common.css">
    <link rel="stylesheet" href="../assets/css/vue.css">
    <script src="../assets/js/vue.js"></script>
    <style>

    </style>
</head>
<body>
<div id="app">
    <a href="../index.html" class="retu">BACK</a>
    <h1>propsData全局扩展数据传递</h1>
    <hr>
    <header></header>
</div>
<script>
    var header_a = Vue.extend({
        template:`<p>{{ message }} - {{ a }}</p>`,
        data : function(){
            return {
                message : 'Hello,I am a Header'
            }
        },
        props:['a']
    });

    //定义好扩展标签,然后进行标签的挂载就可以


    new header_a({propsData:{a:1}}).$mount('header');
</script>
</body>
</html>